package com.zzzm.hospital.ui.activity;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

import com.zzzm.hospital.R;
import com.zzzm.hospital.ui.adapter.DepartmentSystemAdapter;

import java.util.Arrays;
import java.util.List;

public class DepartmentActivity extends AppCompatActivity {

    private RecyclerView recyclerViewLeft;
    private RecyclerView recyclerViewRight;

    private final List<String> departmentSystem = Arrays.asList("内科系统", "外科系统", "妇产系统",
            "儿科系统", "康复理疗系统", "五官科系统", "其它系统", "发热系统");

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_department);

        initView();

        initData();
    }

    private void initView() {
        recyclerViewLeft = findViewById(R.id.left_system_department);
        recyclerViewRight = findViewById(R.id.right_system_department);

        LinearLayoutManager llm = new LinearLayoutManager(this);

        recyclerViewLeft.setLayoutManager(llm);
        recyclerViewRight.setLayoutManager(llm);
    }

    private void initData() {
        DepartmentSystemAdapter adapter = new DepartmentSystemAdapter(this);
        adapter.setDepartmentSystemList(departmentSystem);

        recyclerViewLeft.setAdapter(adapter);


    }
}